from tinkoff_bot.core.models.dto import UserDTO
from tinkoff_bot.infrastructure.database.models import User


def convert_db_model_to_user_dto(user: User) -> UserDTO:
    return UserDTO(
        telegram_id=user.telegram_id,
        id=user.id,
        was_registered=user.created_at,
    )
